package com.xm.queue.task;

import java.util.concurrent.CountDownLatch;

public class TestTask5 {
    public static void main(String[] args) {
        CountDownLatch latch = new CountDownLatch(3);
        for (int i = 0; i < 4; i++) {
            new Thread(() -> {
                Producer.testLimiterPut(50);

                latch.countDown();
            }).start();
        }

        try {
            latch.await();
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        System.out.println(TaskUtil.realPutCount.intValue());
    }
}
